﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SmallJob.Data;
using SmallJob.Data.Interfaces;
using SmallJob.Model;
using SmallShop.Services.Interfaces;

namespace SmallShop.Services.Implements
{
    public class BidRequestService : RepositoryBase<BidRequest>, IBidRequestService
    {
        public BidRequestService(IDatabaseFactory dbFactory) : base(dbFactory) { }
        public List<BidRequest> GetByRequest(int rID) {
            return (from b in SmallJobDB.BidRequests
                    where b.RequestID == rID
                    orderby b.PriceBid descending
                    select b).ToList();
        }
    }
}
